From cb6615b55742b8f128af4579eaa0dc8cf0e14250 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 30 May 2015 21:31:07 -0400 Subject: [PATCH] updateiconcache: Fix compiler warnings Fix warnings due to -Wdeclaration-after-statement and -Wshadow. --- gtk/updateiconcache.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index e71d6fbebc..47375d10dd 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -71,14 +71,14 @@ static gchar *var_name = "-"; #include -static GStatBuf cache_stat; +static GStatBuf cache_dir_stat; static gboolean cache_up_to_date; static int check_dir_mtime (const char *dir, const GStatBuf *sb, int tf) { - if (tf != FTW_NS && sb->st_mtime > cache_stat.st_mtime) + if (tf != FTW_NS && sb->st_mtime > cache_dir_stat.st_mtime) { cache_up_to_date = FALSE; /* stop tree walk */ @@ -95,7 +95,7 @@ is_cache_up_to_date (const gchar *path) gint retval; cache_path = g_build_filename (path, CACHE_NAME, NULL); - retval = g_stat (cache_path, &cache_stat); + retval = g_stat (cache_path, &cache_dir_stat); g_free (cache_path); if (retval < 0) @@ -1167,7 +1167,7 @@ write_bucket (FILE *cache, HashNode *node, int *offset) for (i = 0; i < len; i++) { Image *image = list->data; - int image_data_size = get_image_data_size (image); + int image_size = get_image_data_size (image); /* Directory index */ if (!write_card16 (cache, image->dir_index)) @@ -1178,11 +1178,11 @@ write_bucket (FILE *cache, HashNode *node, int *offset) return FALSE; /* Image data offset */ - if (image_data_size > 0) + if (image_size > 0) { if (!write_card32 (cache, data_offset)) return FALSE; - data_offset += image_data_size; + data_offset += image_size; } else { -- 2.30.2